package com.ybkj.daijia.server.mapper;

import com.ybkj.daijia.server.model.DriverTimeDay;
import org.apache.ibatis.annotations.Param;

public interface DriverTimeDayMapper {

    /**
     * 保存月份记录
     *
     * @param record
     * @return
     */
    int insertRecord(DriverTimeDay record);

    /**
     * 根据主键查询月份记录
     *
     * @param id
     * @return
     */
    DriverTimeDay selectByPrimaryKey(Long id);

    /**
     * 根据年份主键和月份查询月记录
     *
     * @param yearId
     * @param month
     * @return
     */
    DriverTimeDay selectByMonthAndDay(@Param("monthId") Long monthId, @Param("day") Integer day);

    /**
     * 根据主键更新月份记录
     *
     * @param record
     * @return
     */
    int updateByPrimaryKey(DriverTimeDay record);

    int updateLastOnlined(DriverTimeDay record);
}
